#!/usr/bin/env python2

import random

#~ i = 1
#~ 
#~ for nodos in range(100):
	#~ name = "test-" + str(i) + ".txt"
	#~ i = i + 1
	#~ f = open(name, "w+")
#~ 
	#~ print "Generating " + name + "..."
#~ 
	#~ f.write(str(nodos+1) + " " + str(nodos) + "\n")
#~ 
	#~ for j in range(nodos):
		#~ f.write(str(j+1) + " " + str(j+2) + " " + str(random.randint(0,50)) + "\n")
#~ 
	#~ f.close()
	
n = 1
count = 100

for V in range(count):
	
	filename = "test-" + str(n) + ".txt"
	
	n = n + 1
	
	fle = open(filename, "w+")
	
	print "Generating test: " + filename + "..."
	
	nodos = V + 1
	aristas = (nodos * (nodos-1)) / 2
	
	fle.write(str(nodos) + " " + str(aristas) + "\n")
	
	for i in range(nodos):
		for j in range(i+1, nodos):
			fle.write(str(i+1) + " " + str(j+1) + " " + str(random.randint(0,50)) + "\n")
	
	fle.close()
